<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>

<form:form commandName="datebean" cssClass="form-horizontal" role="form">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">基本信息</h3>
        </div>
        <div class="panel-body">
            <div class="col-sm-12">
                <div class="form-group">

                    <label class="col-sm-2 control-label no-padding-right" for="name">姓名<font
                            color="red">*</font></label>
                    <div class="col-sm-3">
                        <input type="text" name="name" id="name" placeholder="请输入姓名" value="${datebean.name}"
                               class="form-control required">
                    </div>

                    <label class="col-sm-2 control-label no-padding-right" for="username">用户名<font color="red">*</font></label>
                    <div class="col-sm-3">
                        <input type="text" name="username" id="username" placeholder="请输入用户名"
                               value="${datebean.username}" class="form-control required">
                    </div>
                </div>


                    <%--<div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right" for="gender">性别</label>
                        <div class="col-sm-3">
                            <form:select path="gender" items="${redis:getDictList('Gender',false)}" itemValue="basId" itemLabel="name" cssClass="form-control"></form:select>
                        </div>

                        <label class="col-sm-2 control-label no-padding-right" for="birthday">出生日期</label>
                        <div class="col-sm-3">
                            <div class="row">
                                <div class="col-xs-8 col-sm-12">
                                    <div class="input-group">
                                        <input type="text" name="birthday" id="birthday"  class="form-control date-picker"  readonly value="${datebean.birthday}" />
                                        <span class="input-group-addon">
                                            <i class="fa fa-calendar bigger-110"></i>
                                        </span>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>

                    <div class="form-group">

                        <label class="col-sm-2 control-label no-padding-right" for="idCard">身份证号码</label>
                        <div class="col-sm-3">
                            <input type="text" name="idCard" id="idCard" placeholder="请输入身份证号" value="${datebean.idCard}" class="form-control ">
                        </div>
                    </div>
                    --%>
                <div class="form-group">
                        <%--	<label class="col-sm-2 control-label no-padding-right" for="nativeAddr">籍贯</label>
                            <div class="col-sm-3">
                                <input type="text" name="nativeAddr" id="nativeAddr" placeholder="籍贯" value="${datebean.nativeAddr}" class="form-control ">
                            </div>--%>

                    <label class="col-sm-2 control-label no-padding-right" for="password">密码<font
                            color="red">*</font></label>
                    <div class="col-sm-3">
                        <input type="password" name="password" id="password" placeholder="请输入密码"
                               value="${datebean.password}" class="form-control required">
                    </div>
                    <label class="col-sm-2 control-label no-padding-right" for="mobile">手机号码</label>
                    <div class="col-sm-3">
                        <input type="text" name="mobile" id="mobile" placeholder="请输入手机号码" value="${datebean.mobile}"
                               class="form-control required">
                    </div>
                </div>

                <div class="form-group">
                        <%--<label class="col-sm-2 control-label no-padding-right" for="email">邮箱</label>
                        <div class="col-sm-3">
                            <input type="text" name="email" id="email" placeholder="请输入邮箱" value="${datebean.email}" class="form-control ">
                        </div>--%>


                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="deptId">部门</label>
                    <div class="col-sm-3">
                        <form:select path="deptId" items="${depts }" itemValue="sysId" itemLabel="deptName"
                                     cssClass="form-control"></form:select>
                    </div>

                    <label class="col-sm-2 control-label no-padding-right" for="roleId">角色</label>
                    <div class="col-sm-3">
                        <select name="roleId" id="roleId" class="form-control">
                            <c:if test="${datebean.roleId==null}">
                                <option value="01" >县领导</option>
                                <option value="02">主要领导</option>
                                <option value="03">分管领导</option>
                                <option value="04">经办人</option>
                                <option value="10">县主官</option>
                                <option value="20">管理员</option>
                            </c:if>
                            <c:if test="${datebean.roleId=='01'}">
                                <option value="01" selected>县领导</option>
                                <option value="02">主要领导</option>
                                <option value="03">分管领导</option>
                                <option value="04">经办人</option>
                                <option value="10">县主官</option>
                                <option value="20">管理员</option>
                            </c:if>
                            <c:if test="${datebean.roleId=='02'}">
                                <option value="01">县领导</option>
                                <option value="02" selected>主要领导</option>
                                <option value="03">分管领导</option>
                                <option value="04">经办人</option>
                                <option value="10">县主官</option>
                                <option value="20">管理员</option>
                            </c:if>
							<c:if test="${datebean.roleId=='03'}">
                            <option value="01">县领导</option>
                            <option value="02">主要领导</option>
                            <option value="03" selected>分管领导</option>
                            <option value="04">经办人</option>
                            <option value="10">县主官</option>
                            <option value="20">管理员</option>
                        </c:if>
							<c:if test="${datebean.roleId=='04'}">
                            <option value="01">县领导</option>
                            <option value="02">主要领导</option>
                            <option value="03">分管领导</option>
                            <option value="04" selected>经办人</option>
                            <option value="10">县主官</option>
                            <option value="20">管理员</option>
                        </c:if><c:if test="${datebean.roleId=='10'}">
                            <option value="01" selected>县领导</option>
                            <option value="02">主要领导</option>
                            <option value="03">分管领导</option>
                            <option value="04">经办人</option>
                            <option value="10" selected>县主官</option>
                            <option value="20">管理员</option>
                        </c:if><c:if test="${datebean.roleId=='20'}">
                            <option value="01">县领导</option>
                            <option value="02">主要领导</option>
                            <option value="03">分管领导</option>
                            <option value="04">经办人</option>
                            <option value="10">县主官</option>
                            <option value="20" selected>管理员</option>
                        </c:if>
                                <%--</select>
                                <form:select path="roleId" items="${redis:getDictList('Position',false)}" itemValue="basId" itemLabel="name" cssClass="form-control"></form:select>
                    --%></select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="position">职务</label>
                    <div class="col-sm-3">
                        <input type="text" name="position" id="position" placeholder="请输入职务"
                               value="${datebean.position}" class="form-control ">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <input type="hidden" name="floorId" value="${datebean.floorId}">
    <input type="hidden" name="userId" value="${datebean.userId}">
</form:form>
<script type="text/javascript">
    jQuery(function ($) {
        $('.date-picker').datepicker({
            inline: true,
            format: "yyyy-mm-dd",
            autoclose: true,
            todayHighlight: true,
            language: 'cn'
        })
        //show datepicker when clicking on the icon
            .next().on(ace.click_event, function () {
            $(this).prev().focus();
        });
    });
</script>